﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApplication1.Models;

namespace WebApplication1.Controllers
{
    public class DefaultController : Controller
    {
        private fashionshoppingDBEntities _context;

        public DefaultController()
        {
            _context = new fashionshoppingDBEntities();
        }
            

        // GET: Default
        public ActionResult Index()
        {
            using (_context)
            {

                var fashion = _context.Products.Include("Procate").ToList();//贪婪加载
                return View(fashion);
            }
              
        }

       
        public ActionResult Users()
        {
            using (_context)
            {
                var User = _context.Users.ToList();

                return View(User);
            }
        }

        public ActionResult dd()
        {
            return View();
        }

    }
}